package com.fileCenter.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.fileCenter.service.domain.ErrorCode;
import com.fileCenter.service.domain.Result;

public class BaseService {
	
	private Log log = LogFactory.getLog(this.getClass());

	public Log getLog() {
		return log;
	}
	
	protected Result buildErrorResult(ErrorCode errorCode) {
		Result result = new Result();
		result.setErrorCode(errorCode.getCode());
		result.setMsg(errorCode.getDesc());
		result.setSuccess(false);
		return result;
	}
}
